﻿<UserControl x:Class="Today.TodayWidget"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:Properties="clr-namespace:Today.Properties"
             Background="#358388" Foreground="White" MouseLeftButtonUp="UserControlMouseLeftButtonUp">
    <UserControl.ContextMenu>
        <ContextMenu>
            <MenuItem Name="RefreshItem" Header="{x:Static Properties:Resources.RefreshItem}" Click="RefreshItemClick"/>
            <MenuItem Name="OptionsItem" Header="{x:Static Properties:Resources.OptionsItem}" Click="OptionsItemClick"/>
        </ContextMenu>
    </UserControl.ContextMenu>
    <UserControl.Resources>
        <Storyboard x:Key="TileAnim">
            <DoubleAnimation Storyboard.TargetName="ForegroundGridTranslation" Storyboard.TargetProperty="Y" From="0" To="-20" Duration="0:0:0.18" AccelerationRatio="0.3" DecelerationRatio="0.7"/>
            <DoubleAnimation Storyboard.TargetName="ForegroundGridTranslation" Storyboard.TargetProperty="Y" BeginTime="0:0:0.18" To="0" Duration="0:0:0.14" AccelerationRatio="0.3" DecelerationRatio="0.7"/>
            <DoubleAnimation Storyboard.TargetName="ForegroundGridTranslation" Storyboard.TargetProperty="Y" BeginTime="0:0:0.32" To="-10" Duration="0:0:0.12" AccelerationRatio="0.3" DecelerationRatio="0.7"/>
            <DoubleAnimation Storyboard.TargetName="ForegroundGridTranslation" Storyboard.TargetProperty="Y" BeginTime="0:0:0.44" To="0" Duration="0:0:0.10" AccelerationRatio="0.3" DecelerationRatio="0.7"/>
        </Storyboard>
    </UserControl.Resources>
    <Grid ClipToBounds="True">
        <Grid Name="ForegroundGrid">
            <Grid.RenderTransform>
                <TranslateTransform x:Name="ForegroundGridTranslation"/>
            </Grid.RenderTransform>
            <Grid.Background>
                <LinearGradientBrush StartPoint="0,0" EndPoint="1,0">
                    <GradientStop Color="#FFDB8514" Offset="0"/>
                    <GradientStop Color="#FFE2A41F" Offset="1"/>
                </LinearGradientBrush>
            </Grid.Background>
            <StackPanel Margin="10,10,10,30">
                <DockPanel>
                    <StackPanel DockPanel.Dock="Left">
                        <TextBlock Name="Day" Text="01" FontSize="86" FontWeight="Light"/>
                        <TextBlock Name="Month" Text="JANUARY" FontSize="14" Margin="0,-15,0,0"/>
                    </StackPanel>
                    <StackPanel VerticalAlignment="Bottom" Margin="20,0,10,25">
                        <TextBlock Name="Title" FontSize="14" TextTrimming="CharacterEllipsis"/>
                        <TextBlock Name="Location" FontSize="14" Visibility="Collapsed" TextTrimming="CharacterEllipsis"/>
                        <TextBlock Name="Description" FontSize="14" Visibility="Collapsed" TextTrimming="CharacterEllipsis"/>
                        <TextBlock Name="Time" FontSize="14" TextWrapping="Wrap"/>
                        <TextBlock Name="Tip" Text="{x:Static Properties:Resources.Tip}" VerticalAlignment="Center" HorizontalAlignment="Center"
                                   Foreground="White" Margin="10" FontSize="16" TextWrapping="Wrap" Visibility="Collapsed"/>
                    </StackPanel>
                </DockPanel>
            </StackPanel>
            <TextBlock Text="Today" Foreground="White" FontSize="14" VerticalAlignment="Bottom" HorizontalAlignment="Left" Margin="10,0,0,10"/>
        </Grid>
    </Grid>
</UserControl>
